<?php

namespace App\Http\Requests;


class DeptRequest extends BaseRequest
{
    public function rules()
    {
        return [
            'dept_name' => 'required|between:1,100|unique:sys_dept,dept_name,'.$this->post('id'),
            'status' => 'required'
        ];
    }

    public function messages()
    {
        return [
            'dept_name.required' => '部门名称必须填写',
            'dept_name.between' => '部门名称1-100个字符之间',
            'dept_name.unique' => '部门名称已存在',

            'status.required' => '请选择状态',
        ];
    }
}
